package com.topnav.mc.document.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.topnav.mc.admin.dao.mapper.FenceMapper;
import com.topnav.mc.admin.entity.Fence;
import com.topnav.mc.admin.entity.bean.FenceBean;
import com.topnav.mc.admin.entity.param.FenceParam;
import com.topnav.mc.base.CommServiceImpl;
import com.topnav.mc.base.mc.McServiceImpl;
import com.topnav.mc.document.dao.mapper.DocumentMapper;
import com.topnav.mc.document.entity.Document;
import com.topnav.mc.document.entity.bean.DocumentBean;
import com.topnav.mc.document.entity.param.DocumentParam;
import com.topnav.mc.document.service.IDocumentService;
import org.springframework.stereotype.Service;

@Service
public class DocumentServiceImpl extends McServiceImpl<DocumentMapper, Document, DocumentBean, DocumentParam> implements IDocumentService{


    @Override
    public <E extends IPage<Document>> E searchDocument(E page, Document doc) {

        Page<Document> page1 = new Page<Document>(page.getCurrent(),page.getSize());
        IPage<Document> resultPage = getBaseMapper().searchDocument(page1, doc);

        return (E) resultPage;
    }
}
